﻿@{
    Layout = null;
}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>登录</title>
    <!--jQuery-->
    <script src="@Url.Content("~/assets/scripts/jquery-1.5.1.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/assets/Scripts/jquery.validate.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/assets/Scripts/jquery.qtip.js")" type="text/javascript"></script>
    <!--css-->
    <link rel="stylesheet" href="/assets/css/reset.css" type="text/css" media="screen" />
    <link rel="stylesheet" href="/assets/css/main.css" type="text/css" media="screen" />
    <link rel="stylesheet" href="/assets/css/jquery.qtip.css" type="text/css" media="screen" />
    <script type="text/javascript">
        var opt = {
            //errorElement: "br",
            rules: {
                username: { required: true, minlength: 3 },
                password: { required: true, minlength: 6 }
            },
            messages: {
                username: { required: "用户名不能为空", minlength: "长度不能小于3" },
                password: { required: "密码不能为空", minlength: "密码长度不能小于6" }
            },
            errorPlacement: function (error, element) {
                $(element).qtip({
                    show: { event: false, ready: true },
                    position: { my: "top center", at: "bottom center" },
                    content: { text: error }
                });
            }
        };
        $(document).ready(function () {
            $("#form1").validate(opt);
        });
    </script>
</head>
<body id="b_login">
    <div id="header">
        <div id="logo">
            <h1 id="header_broomcupboard">
                <span class="logonew">
                    <img src="/assets/img/logo.png" width="200" height="100" />
                    短信系统
                </span>
            </h1>
            <h4 id="header_strapline">&nbsp;</h4>
        </div>
    </div>
    <form action="/login/msguser" method="post" class="login_form" id="form1">
        <fieldset>
            @if (ViewBag.HasError != null)
            {
                <div class="notification error">
                    <a href="#" class="close" title="关闭">关闭</a> <em>
                        <img src="/assets/img/icons/cross_circle.png" alt="" />
                        <span id="spanerror">账号或密码错误</span></em>
                </div>
            }
            <label for="username" class="label2">
                <span>账号</span>
                @Html.TextBox("username")
            </label>
            <!--/end .label2-->
            <label for="password" class="label2">
                <span>密码</span>
                @Html.Password("password")
            </label>
            <!--/end .label2-->
            <div class="button">
                <div class="btn-inner">
                    <span><em>
                        <button type="submit">
                            <img src="/assets/img/icons/lock.png" alt="" />登 录</button>
                    </em></span>
                </div>
            </div>
        </fieldset>
    </form>
</body>
</html>
